<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view locale="#{locale.locale}">
    <f:loadBundle basename="ru.ssau.berlin.jsf.i18n.Messages" var="bundle"/>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title><h:outputText value="#{bundle.ssau_manage_system}"/></title>
        </head>
        <body>
            <small>
                <h:form>
                    <h:commandLink action="#{locale.setLocale}" value="en">
                        <f:param name="locale" value="en"/>
                    </h:commandLink> | 
                    <h:commandLink action="#{locale.setLocale}" value="ru">
                        <f:param name="locale" value="ru"/>
                    </h:commandLink>
                </h:form>
            </small>
            <h1><h:outputText value="#{bundle.ssau_manage_system}"/></h1>
            <h:form>
                <h:panelGrid border="1" cellpadding="5" columns="4">
                    <h:outputText value=""/>
                    <h:outputText value="#{bundle.persons}"/>
                    <h:outputText value="#{bundle.groups}"/>
                    <h:outputText value="#{bundle.events}"/>
                    <h:outputText value="#{bundle.metadata}"/>
                    <h:commandLink action="#{person.showAllTypes}"
                                   value="#{bundle.person_types}"/>
                    <h:commandLink action="#{groupType.showAll}"
                                   value="#{bundle.group_types}"/>
                    <h:commandLink action="#{event.showAllTypes}"
                                   value="#{bundle.event_types}"/>
                    <h:outputText value="#{bundle.data}"/>
                    <h:commandLink action="#{person.showAllPersons}"
                                   value="#{bundle.persons}"/>
                    <h:commandLink action="#{group.showAllGroups}"
                                   value="#{bundle.groups}"/>
                    <h:commandLink action="#{event.showAllEvents}"
                                   value="#{bundle.events}"/>
                </h:panelGrid>
                <h2><h:outputText value="#{bundle.queries}"/></h2>
                <h:commandLink action="#{query.showNonAchievers}"
                               value="#{bundle.show_non_achievers}"/> <br/>
                <h:commandLink action="#{query.showInstructorsSchedule}"
                               value="#{bundle.show_instructors_schedule}"/> <br/>
                <h:commandLink action="#{query.showSalaries}"
                               value="#{bundle.show_employees_salary}"/> <br/>
                <h:commandLink action="#{query.showGroupSchedule}"
                               value="#{bundle.show_group_schedule}"/> <br/>
                <h:commandLink action="#{query.showStudentSchedule}"
                               value="#{bundle.show_student_schedule}"/> <br/>
                <h2><h:outputText value="#{bundle.admin_panel}"/></h2>
                <h:commandLink action="#{admin.fillAttributeTypes}"
                               value="#{bundle.fill_attributes_db}"/>
            </h:form>
        </body>
    </html>
</f:view>
